﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace Handler
{
    class Program
    {
        static void Main(string[] args)
        {
            KeyboardHendler kh = new KeyboardHendler();

            kh.KeyLeft += Left;
            kh.KeyUp += Up;
            kh.KeyRight += Right;
            kh.KeyDown += Down;

            for (;;)
            {
                kh.QueryKB();
            }

        }

        static void Left(object sender, EventArgs e)
        {
            Console.WriteLine('L');
        }
        static void Right(object sender, EventArgs e)
        {
            Console.WriteLine('R');
        }
        static void Up(object sender, EventArgs e)
        {
            Console.WriteLine('U');
        }
        static void Down(object sender, EventArgs e)
        {
            Console.WriteLine('D');
        }
    }
}
